package com.foreverwin.jzymes.report.labor.controller;


import com.foreverwin.jzymes.common.util.CommonMethods;
import com.foreverwin.jzymes.framework.base.AjaxResult;
import com.foreverwin.jzymes.framework.base.BaseController;
import com.foreverwin.jzymes.framework.exception.BusinessException;
import com.foreverwin.jzymes.production.labor.domain.LaborAttendanceLog;
import com.foreverwin.jzymes.production.labor.service.ILaborAttendSerchService;
import com.foreverwin.jzymes.report.labor.service.ILaborAttendReportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/report/labor")
public class LaborAttanceLogReportController extends BaseController {
    @Autowired
    ILaborAttendReportService laborAttendReportService;

    /**人力出勤报表*/
    @RequestMapping("/LaborAttanceReport")
    public AjaxResult LaborAttanceReport(@RequestParam Map<String,Object> jsonMap){
         jsonMap.put("site",CommonMethods.getSite());
         List<LaborAttendanceLog> laborAttendanceLogs = laborAttendReportService.findLaborAttanceReport(jsonMap);
        return  AjaxResult.returnSuccess().put("value",laborAttendanceLogs);
    }

}
